home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / emacs16d.zip / _MODES.MIN < prev    next >
Text File  |  1991-08-17  |  7KB  |  336 lines

  1.  
  2.  
  3. Name:F:ASM-mode
  4. This will set the local mode to Assembly Language.
  5. [*]#(Fexit-mode)
  6. #(Flocal-bind-key,F-left-comment,;)
  7. #(Flocal-bind-key,F-right-comment,)
  8. #(Flocal-bind-key,K.M-C-i,U:asm-format)
  9. #(Flocal-bind-key,K.M-Tab,U:asm-format)
  10. #(Flocal-bind-key,staydown-hook,(
  11.     #(n?,UASM-staydown-do.ARG1,(
  12.         #(UASM-staydown-do.ARG1)
  13.     ),(
  14.         #(Fstaydown-do-do,ARG1)
  15.     ))
  16. ))
  17. #(mp,staydown-hook,,ARG1)
  18. #(ds,syntax,##(Fsyntax))
  19. #(Fmodify-syntax,syntax,##(bc,$),1)
  20. #(Fmodify-syntax,syntax,##(bc,.),1)
  21. #(st,syntax)
  22. #(Fset-modename,ASM)
  23. [*]
  24.  
  25.  
  26. Name:F:Buffer Menu-mode
  27. This will autoload the D library, dired.
  28. [*]#(D!Buffer Menu-mode)[*]
  29.  
  30.  
  31. Name:F:Fun-mode
  32. [*]
  33. #(Fexit-mode)
  34. #(Fset-modename,Fun)
  35. [*]
  36.  
  37.  
  38. Name:F:Indented Text-mode
  39. [*]#(Fexit-mode)
  40. #(Flocal-bind-key,K.Tab,F:indent-relative)
  41. #(Flocal-bind-key,space-hook,(
  42.     #(F:indent-relative)
  43. ))
  44. #(ds,local-mode-changes,##(local-mode-changes)(
  45.     #(es,space-hook)
  46.     #(Fexit-minor-mode,Fill)
  47. ))
  48. #(Fenter-minor-mode,Fill)
  49. #(ds,syntax,##(Fsyntax))
  50. #(Fmodify-syntax,syntax,##(bc,'),0)
  51. #(st,syntax)
  52. #(Fset-modename,Indented Text)
  53. [*]
  54.  
  55.  
  56. Name:F:LaTeX-mode
  57. [*][*]
  58.  
  59.  
  60. Name:F:TEX-mode
  61. [*][*]
  62.  
  63.  
  64. Name:F:Text-mode
  65. [*]#(Fexit-mode)
  66. #(Flocal-bind-key,K.Tab,F:tab-to-tab-stop)
  67. #(ds,local-mode-changes,##(local-mode-changes)(
  68.     #(Fexit-minor-mode,Fill)
  69. ))
  70. #(Fenter-minor-mode,Fill)
  71. #(ds,syntax,##(Fsyntax))
  72. #(Fmodify-syntax,syntax,##(bc,'),0)
  73. #(st,syntax)
  74. #(Fset-modename,Text)
  75. [*]
  76.  
  77.  
  78. Name:F:asm-mode
  79. [*]#(F:ASM-mode)[*]
  80.  
  81.  
  82. Name:F:auto-spell-mode
  83. Toggle auto-spell-mode.  In spell-mode, Space and Return spell check the
  84. word before the point.
  85. [*]    
  86. #(==,##(sc,,2),-1,(
  87.     #(Ferror,The spelling checker is not installed!)
  88. ),(
  89.     #(Fset-minor-mode,Spell,arg1)
  90. ))
  91. [*]
  92.  
  93.  
  94. Name:F:fundamental-mode
  95. [*]#(F:Fun-mode)[*]
  96.  
  97.  
  98. Name:F:indented-text-mode
  99. [*]#(F:Indented Text-mode)[*]
  100.  
  101.  
  102. Name:F:mouse
  103. [*]#(n?,Pfilename,,(#(Fload-lib,mouse)))
  104. #(ds,temp,arg1)
  105. #(..,##(gn,temp,2))
  106. #(ds,temp,#(Pmodeline,modeline,text,scrollbar)-##(temp))
  107. #(n?,P.##(temp),(
  108.     #(#(P.##(temp)))
  109. ),(
  110.     #(bl)
  111. ))[*]
  112.  
  113.  
  114. Name:F:overwrite-mode
  115. Toggle Overwrite mode.  In Overwrite mode, typed characters replace existing
  116. characters.
  117. [*]    
  118. #(Fset-minor-mode,Overwrite,arg1)[*]
  119.  
  120.  
  121. Name:F:save-all-libs
  122. Save all modified libraries.
  123. [*]#(Fexcurse-buffer,(
  124.     #(Ffor-all-libs,Fsave-docs)
  125.     #(Fexit-mode)
  126.     #(Ffor-all-libs,Fsetdown-lib)
  127.     #(Ffor-all-libs,Fsave-lib)
  128.     #(Ffor-all-libs,Fsetup-lib)
  129. ))
  130. #(an)[*]
  131.  
  132.  
  133. Name:F:tex-mode
  134. [*][*]
  135.  
  136.  
  137. Name:F:text-mode
  138. [*]#(F:Text-mode)[*]
  139.  
  140.  
  141. Name:Fenter-local-modes
  142. Given the mode of the current buffer, enter all the local modes, i.e. the major
  143. mode for this buffer, and any minor modes in effect.  Eventually, we'll deal
  144. with local variables.
  145. [*]
  146. #(Fexit-mode)
  147. #(Fresolve-name,##(buffer-mode.##(ba,-1))-mode,(
  148.     #(#(temp))
  149. ))
  150. #(Fmultiple,Flocal-bind-var,##(ls,(,),buffer-vars.##(ba,-1).),SELF)
  151. [*]
  152.  
  153.  
  154. Name:Fenter-minor-mode
  155. Add a minor mode to the current buffer's mode.
  156. [*]#(Fin-minor-mode,arg1,,(
  157.     #(ds,minor-modes.##(ba,-1),##(minor-modes.##(ba,-1)) arg1)
  158. ))[*]
  159.  
  160.  
  161. Name:Fexit-minor-mode
  162. Remove a minor mode from the current buffer's minor mode list.
  163. [*]#(mp,minor-modes.##(ba,-1),, arg1)[*]
  164.  
  165.  
  166. Name:Fexit-mode
  167. This will undo the local mode's changes.  Always resets the syntax table
  168. to Fsyntax.
  169. [*]
  170. #(local-mode-changes)
  171. #(ds,local-mode-changes)
  172. #(st,Fsyntax)
  173. [*]
  174.  
  175.  
  176. Name:Fext-mode-list
  177. [*][*]
  178.  
  179.  
  180. Name:Ffor-all-libs
  181. Execute the string named in arg1 on all lib letters.  Equivalent to #(arg1,F)
  182. #(arg1,M)#(arg1,K) etc...
  183. [*]#(ds,arg2.lib-list,##(lib-list))
  184. #(SELF-do,(arg1),##(go,arg2.lib-list,!!!),arg2)
  185. #(es,arg2.lib-list)[*]
  186.  
  187.  
  188. Name:Ffor-all-libs-do
  189. [*]#(==,arg2,!!!,,(
  190.     #(arg1,arg2)
  191.     #(SELF,(arg1),##(go,arg3.lib-list,!!!),arg3)
  192. ))[*]
  193.  
  194.  
  195. Name:Fin-minor-mode
  196. If we are in minor mode arg1, return arg2 else arg3
  197. [*]#(==,
  198.     #(n?,minor-modes.##(ba,-1),(
  199.         ##(fm,minor-modes.##(ba,-1), arg1,no)
  200.         #(rs,minor-modes.##(ba,-1))
  201.     ),no)
  202. ,no,(
  203.     arg3
  204. ),(
  205.     arg2
  206. ))[*]
  207.  
  208.  
  209. Name:Flib-letter
  210. Return the name (single letter) of the library to which the string
  211. arg1 belongs, arg2 is used as prefix.
  212. [*]#(Fresolve-name,(arg1),(##(go,temp)),(arg2))[*]
  213.  
  214.  
  215. Name:Fload-lib
  216. Load the library whose filename is given in arg1.
  217. [*]#(an,Loading #(env.EMACS)arg1.ed,,...)
  218. #(ds,temp,#(ll,#(env.EMACS)arg1.ed))
  219. #(==,##(temp),,(
  220.     #(mp,lib-list,,##(lib-name))
  221.     #(ds,lib-list,##(lib-name)##(lib-list))
  222.     #(n?,##(lib-name)&setup,(
  223.         #(##(lib-name)&setup)
  224.     ))
  225.     #(an)
  226. ),(
  227.     #(an,#(env.EMACS)arg1: ##(temp))
  228. ))[*]
  229.  
  230.  
  231. Name:Fmode-line
  232. This shows us where we are and what we're doing.
  233. [*]#(sv,fc,#(F-mode-fore-color))
  234. #(sv,bc,#(F-mode-back-color))
  235. #(an,
  236.     --
  237.     #(Fbuffer-modified,**,--,%%)
  238.     -
  239.     Emacs: 
  240.     #(buffer-number.##(ba,-1)) 
  241.     ##(Fmode-parens,##(buffer-mode.##(ba,-1))#(mode-line-mode)##(minor-modes.##(ba,-1))#(n?,kbd-macro-d, Def))
  242.     --
  243.     C#(lv,cs) 
  244.     L#(lv,cl)/#(lv,nl) 
  245.     --
  246.     #(Fwhere)
  247.     ---------------------------------------------------------
  248. ,a
  249. )
  250. #(sv,fc,#(F-fore-color))
  251. #(sv,bc,#(F-back-color))
  252. [*]
  253.  
  254.  
  255. Name:Fmode-parens
  256. Parentheses around the major and minor modenames
  257. [*](arg1)[*]
  258.  
  259.  
  260. Name:Fsave-docs
  261. Save the documentation for a library.
  262. [*]#(n?,buffer-name.##(arg1filename).edd,(
  263.     #(..,##(ba,##(buffer-name.##(arg1filename).edd)))
  264.     #(Fbuffer-modified,(
  265.         #(an,Saving documentation in #(Fbuffer-fn) ,,...)
  266.         #(Fwrite-file,#(Fbuffer-fn))
  267.     ))
  268. ))[*]
  269.  
  270.  
  271. Name:Fsave-lib
  272. Write a library and its documentation out.  Make a backup of the library.
  273. **** Be sure to execute this ONLY in Fundamental mode, and without any
  274. libraries installed. ****
  275. [*]#(==,##(arg1filename),,(
  276.     #(an,Library arg1 not loaded!)
  277. ),(
  278.     #(n?,arg1modified,(
  279.         #(es,arg1modified)
  280.         #(an,Saving arg1's in #(env.EMACS)##(arg1filename) ,,...)
  281.         #(ds,lib-name,arg1)
  282.         #(..,#(de,#(env.EMACS)##(arg1filename).tmp))
  283.         #(..,#(rn,#(env.EMACS)##(arg1filename).ed,#(env.EMACS)##(arg1filename).tmp))
  284.         #(Ferror,#(sl,#(env.EMACS)##(arg1filename).ed,lib-name,#(ls,(,),arg1)))
  285.         #(an,Saving arg1's in #(env.EMACS)##(arg1filename) done)
  286.     ))
  287. ))
  288. [*]
  289.  
  290.  
  291. Name:Fset-minor-mode
  292. Enter or exit minor mode arg1 according to arg2.  If arg2 is blank, toggle
  293. the minor mode.  If arg2 is greater than zero, enter, else exit.
  294. [*]#(==,arg2,,(
  295.     #(Fin-minor-mode,arg1,(
  296.         #(Fexit-minor-mode,arg1)
  297.     ),(
  298.         #(Fenter-minor-mode,arg1)
  299.     ))
  300. ),(
  301.     #(g?,arg2,0,(
  302.         #(Fenter-minor-mode,arg1)
  303.     ),(
  304.         #(Fexit-minor-mode,arg1)
  305.     ))
  306. ))
  307. [*]
  308.  
  309.  
  310. Name:Fset-mode-by-ext
  311. Note: the function that implements foo-mode must be defined in the F library,
  312. otherwise it will not be recognized.
  313. [*]#(Fexit-mode)
  314. #(Fset-modename,#(Flookup,F-ext-mode-list,.#(Fextens-only,#(Fbuffer-fn))(,),(
  315. ),Fun))
  316. #(Fenter-local-modes)
  317. [*]
  318.  
  319.  
  320. Name:Fset-modename
  321. This changes the local major mode to arg1.
  322. [*]#(ds,buffer-mode.##(ba,-1),arg1)[*]
  323.  
  324.  
  325. Name:Fsetdown-lib
  326. Set down a library.  That is, unchange anything the library changed.
  327. [*]#(==,arg1,F,,(
  328.     #(gs,arg1&setdown)
  329. ))[*]
  330.  
  331.  
  332. Name:Fsetup-lib
  333. Set up a library.  That is, change anything the library needs changed.
  334. [*]#(==,arg1,F,,(
  335.     #(gs,arg1&setup)
  336. ))[*]